package cn.iocoder.yudao.module.promotion.rebate.service.impl;

import cn.iocoder.yudao.framework.business.basic.dao.query.CoreQueryWrapper;
import cn.iocoder.yudao.framework.business.basic.service.impl.BaseService;
import cn.iocoder.yudao.module.promotion.rebate.convert.RebateRecordConvert;
import cn.iocoder.yudao.module.promotion.rebate.dao.RebateRecordMapper;
import cn.iocoder.yudao.module.promotion.rebate.pojo.dto.RebateRecordQueryDTO;
import cn.iocoder.yudao.module.promotion.rebate.pojo.dto.RebateRecordSaveDTO;
import cn.iocoder.yudao.module.promotion.rebate.pojo.po.RebateRecord;
import cn.iocoder.yudao.module.promotion.rebate.pojo.vo.RebateRecordVO;
import cn.iocoder.yudao.module.promotion.rebate.service.RebateRecordService;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 服务实现类
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/04/12
 */
@Service
public class RebateRecordServiceImpl extends BaseService<RebateRecord, RebateRecordVO, RebateRecordQueryDTO> implements RebateRecordService {
    @Resource
    private RebateRecordMapper rebateRecordMapper;

    @Override
    public RebateRecordMapper getInjectedMapper() {
        return rebateRecordMapper;
    }

    @Override
    public RebateRecord convertToEntity(RebateRecordSaveDTO param) {
        return RebateRecordConvert.INSTANCE.toEntity(param);
    }

    @Nonnull
    @Override
    protected CoreQueryWrapper<RebateRecord> buildQueryWrapper(RebateRecordQueryDTO param) {
        CoreQueryWrapper<RebateRecord> wrapper = super.buildQueryWrapper(param);
        // TODO 添加自定义查询条件
        return wrapper;
    }

}
